﻿Public Class frmInsertarCaballo
#Region "variables"
    Private _posX As Integer
    Private _posY As Integer
    Property posicionX() As Integer
        Get
            Return _posX
        End Get
        Set(ByVal value As Integer)
            _posX = value
        End Set
    End Property
    Property posicionY() As Integer
        Get
            Return _posY
        End Get
        Set(ByVal value As Integer)
            _posY = value
        End Set
    End Property
#End Region

#Region "Formulario"

    Private Sub frmInsertarCaballo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.txtColumna.Text = Funciones.randomY
        Me.txtFila.Text = Funciones.randomX

    End Sub
#End Region

#Region "Botones de Formulario"
    Private Sub btnCancelar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancelar.Click
        Me.txtFila.Text = 0
        Me.txtColumna.Text = 0
        Me.Close()
    End Sub

    Private Sub btnAceptar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAceptar.Click
        Me.posicionX = Me.txtFila.Text
        Me.posicionY = Me.txtColumna.Text
        Me.Close()

    End Sub

#End Region

#Region "botones de numeros aleatoreas"
  
    Private Sub btnFila_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFila.Click
        Me.txtFila.Text = Funciones.randomX
    End Sub

    Private Sub btnColumna_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnColumna.Click
        Me.txtColumna.Text = Funciones.randomY
    End Sub
#End Region
End Class